<% @page_title = "#{Event.categories[params[:cat].to_i]}活动 | 多背一公斤 - 灾后学校重建计划" %>

<% content_for :sidebar do -%>
  <h2><%= link_to "发布一个新活动", new_event_url %></h2>
  <h2><%= link_to "返回最新活动", events_url %></h2>
  <h2><%= link_to "返回所有活动", all_events_url %></h2>
  <%= render :partial => 'category', :locals => {:categories_count => @categories_count, :status => params[:t].to_s} %>
  
  <h2>大家要去哪 &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; &middot;&nbsp; </h2>
  <%= render :partial => 'users_go_where', :locals => {:participations => @participations} %>
<% end -%>

<h1>全部<%= Event.categories[params[:cat].to_i] %>活动</h1>
<% @events.each do |event| -%>
  <%= render :partial => 'event', :object => event %>
<% end -%>

<%= will_paginate @events %>